.admin-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  z-index: 1000;
  overflow-y: auto;
}

.admin-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  margin-top: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e0e0e0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.admin-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.error-message {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 20px;
  margin: 20px 30px;
  border-radius: 6px;
}

.error-message button {
  background: none;
  border: none;
  color: #c33;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
}

.admin-tabs {
  display: flex;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.tab {
  flex: 1;
  padding: 15px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}

.tab:hover {
  background-color: #e9ecef;
  color: #333;
}

.tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background-color: white;
}

.admin-content {
  padding: 30px;
  min-height: 400px;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 18px;
  color: #666;
}

/* 统计概览样式 */
.statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.stat-card {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.stat-item span:first-child {
  color: #555;
  font-weight: 500;
}

.stat-item span:last-child {
  color: #667eea;
  font-weight: 700;
  font-size: 18px;
}

/* 搜索和过滤器样式 */
.search-bar, .filters {
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.search-bar input, .filters input, .filters select {
  padding: 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
  min-width: 150px;
}

.search-bar input {
  flex: 1;
  max-width: 400px;
}

.search-bar input:focus, .filters input:focus, .filters select:focus {
  outline: none;
  border-color: #667eea;
}

/* 表格样式 */
.users-table, .records-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.users-table table, .records-table table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th, .records-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.users-table td, .records-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-table tr:hover, .records-table tr:hover {
  background-color: #f8f9fa;
}

/* 状态样式 */
.status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status.active, .status.success {
  background-color: #d4edda;
  color: #155724;
}

.status.inactive, .status.failed {
  background-color: #f8d7da;
  color: #721c24;
}

.status.processing {
  background-color: #fff3cd;
  color: #856404;
}

/* 操作按钮样式 */
.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.action-btn.enable {
  background-color: #28a745;
  color: white;
}

.action-btn.disable {
  background-color: #dc3545;
  color: white;
}

.action-btn:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.action-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* 下拉选择框样式 */
select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
}

select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  color: #999;
}

/* 特殊列样式 */
.user-agent {
  max-width: 150px;
  font-size: 12px;
  color: #666;
}

.filename {
  max-width: 120px;
  font-family: monospace;
  font-size: 12px;
}

.error-message {
  max-width: 200px;
  color: #dc3545;
  font-size: 12px;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 20px 0;
}

.pagination button {
  padding: 8px 16px;
  border: 2px solid #667eea;
  background-color: white;
  color: #667eea;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  background-color: #667eea;
  color: white;
}

.pagination button:disabled {
  border-color: #ccc;
  color: #ccc;
  cursor: not-allowed;
}

.pagination span {
  font-weight: 600;
  color: #333;
}

/* 权限不足页面样式 */
.permission-denied {
  text-align: center;
  padding: 60px 40px;
  color: #666;
}

.permission-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.8;
}

.permission-denied h3 {
  color: #333;
  font-size: 24px;
  margin: 20px 0 15px 0;
  font-weight: 600;
}

.permission-denied p {
  font-size: 16px;
  line-height: 1.6;
  margin: 10px 0;
  color: #666;
}

.close-button {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 30px;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: linear-gradient(135deg, #5a6fd8, #6a4190);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .admin-panel {
    margin: 10px;
    max-height: 95vh;
  }
  
  .admin-header {
    padding: 15px 20px;
  }
  
  .admin-header h2 {
    font-size: 20px;
  }
  
  .admin-content {
    padding: 20px;
  }
  
  .statistics-grid {
    grid-template-columns: 1fr;
  }
  
  .search-bar, .filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-bar input, .filters input, .filters select {
    min-width: auto;
  }
  
  .users-table, .records-table {
    overflow-x: auto;
  }
  
  .users-table table, .records-table table {
    min-width: 800px;
  }
  
  .tab {
    padding: 12px 10px;
    font-size: 14px;
  }
  
  .pagination {
    flex-direction: column;
    gap: 10px;
  }
} 